package com.example.smartcity.tools;

import android.content.Context;
import android.content.SharedPreferences;

import com.example.smartcity.LoginActivity;

public class SpTools {
    public static String get(Context context, String name) {
        SharedPreferences sp = context.getSharedPreferences("app", 0);
        return sp.getString(name, "");
    }

    public static void put(Context context, String name, String v) {
        SharedPreferences sp = context.getSharedPreferences("app", 0);
        SharedPreferences.Editor editor = sp.edit();
        editor.putString(name, v);
        editor.commit();
    }
}
